home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5585 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: hilbert.dnai.com!usenet
  2. From: Victor Bazarov <vbazarov@imsisoft.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Money for solution to printing problem
  5. Date: Mon, 05 Feb 1996 12:16:09 -0800
  6. Organization: IMSI
  7. Message-ID: <31166589.C70@imsisoft.com>
  8. References: <4f1lc7$a2f@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: 204.182.61.84
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b6a (Win95; I)
  14.  
  15. Recursion wrote:
  16. > Not really but since you are already here why not tell me how to send
  17. > output to the printer.
  18. > in PASCAL I used writeln(LST,"HELLO")
  19. > is there a function in C++ that will do this all I have seen is the cout
  20. > and the printf functions or classes or whatever they are.  Any help is
  21. > greatly appreciated.
  22.  
  23. It is quite system-dependent. In general case it's not a bad solution
  24. to write to cout, and redirect output to the printer when running the program.
  25. In MS-DOS, for example, it'd be
  26.  
  27. myprog >prn
  28.  
  29. where 'prn' is a reserved file name for printer.
  30.  
  31. Victor.
  32.